import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
// import Mint from 'mint-ui'
// import 'mint-ui/lib/style.css'
import attachFastClick from 'fastclick'
import '@/libs/request'
import 'lib-flexible'
import '@/assets/scss/index.scss'

import { Toast } from 'vant'
Vue.use(Toast)

import { Dialog } from 'vant'
Vue.use(Dialog)
// import Toast from './plugins/toast'
// Vue.use(Toast)

Vue.config.productionTip = false

// 消除 click 移动浏览器300ms延迟
attachFastClick.attach(document.body)

//引入mint-ui全部组件
// Vue.use(Mint)

window.axios = axios

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

router.beforeEach((to, from, next) => {
  document.title = to.meta.title
  next()
})